﻿<FluentSwitch @bind-Value="@open">Show</FluentSwitch>
<FluentMenu @bind-Open="@open" @onmenuchange=OnMenuChange Width="400px">
    <FluentMenuItem>Menu item 1</FluentMenuItem>
    <FluentMenuItem>Menu item 2</FluentMenuItem>
    <FluentMenuItem Disabled="true">Menu item 3 Disabled</FluentMenuItem>
    <FluentMenuItem>Menu item 4</FluentMenuItem>
</FluentMenu>
<p>@status</p>

@code{
    bool open = false;
    private string status = "";
    
    private void OnMenuChange(MenuChangeEventArgs args)
    {
        if (args is not null && args.Value is not null)
            status = $"{args.Value} selected";
    }
}